<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>用原生的js实现购物车计算价格的功能</title>
		<link rel="stylesheet" type="text/css" href="css/cart.css"/>
	</head>
	<body>
		<div class="box">
			<ul>
				<li>
					&yen;<span>50.99</span>
					<input id="subtract1" type="button" value="-" onclick="changePrice(this)"/>
					<input id="first" type="text" value="1" />
					<input id="add1" type="button" value="+" onclick="changePrice(this)"/>
					<strong>合计：&yen;<span>50.99</span></strong>
					<a href="#" id="delete1">删除</a>
				</li>
				<li>
					&yen;<span>70.00</span>
					<input id="subtract2" type="button" value="-" onclick="changePrice(this)"/>
					<input id="second" type="text" value="1" />
					<input id="add2" type="button" value="+" onclick="changePrice(this)"/>
					<strong>合计：&yen;<span>70.00</span></strong>
					<a href="#">删除</a>
				</li>
				<li>
					&yen;<span>40.00</span>
					<input id="subtract3" type="button" value="-" onclick="changePrice(this)"/>
					<input id="third" type="text" value="1" />
					<input id="add3" type="button" value="+" onclick="changePrice(this)"/>
					<strong>合计：&yen;<span>40.00</span></strong>
					<a href="#">删除</a>
				</li>
			</ul>
			<div class="div_total">总合计：&yen;<span>160.99</span></div>
		</div>
	</body>
	<script src="js/cart.js" type="text/javascript" charset="utf-8"></script>
</html>
